<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定位元素的宽高随谁</title>
    <style>
        .box{
            /*position: relative;*/
            width:350px;
            height:350px;
            background-color: burlywood;
        }
        .son{
            width:50%;
            height:50%;
            background-color: green;
            position: absolute;
            left:15px;
            top:15px;
        }
    </style>
</head>
<body>
<div class="box">
    <div class="son"></div>
</div>
</body>
</html>